<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@ include file="../config/config.jsp"%>

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<link rel="stylesheet" href="<%=basePath %>/css/bootstrap.min.css" media="screen"/>
<link rel="stylesheet" href="<%=basePath %>/css/bootstrap-theme.min.css" />

<script src="<%=basePath %>/js/jquery-3.2.1.min.js"></script>
<script src="<%=basePath %>/js/bootstrap.min.js"></script>

<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}

.table tr td {
	border: 1px solid transparent !important;
}

.form-control {
	width: 14%;
}
</style>
</head>
<form action="../seatsServlet?method=add" class="form"
	method="post">
	<table class="table table-condensed">
		<tr>
			<td width="7%" style="line-height: 32px;">编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</td>
			<td><input type="text" name="seatId" class="form-control"  style="width:215px;"
				required /></td>
		</tr>
		<tr>
			<td style="line-height: 32px;">场&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;厅</td>
			<td>
				<select name="hallId" class="selectpicker show-tick form-control" style="width: 215px;"
				data-live-search="false" required>
					<%
						List<Hall> HallList = (List<Hall>) request.getAttribute("HallList");
						for (int i = 0; i < HallList.size(); i++) {
							Hall m = HallList.get(i);
					%>
						<option value="<%=m.getHallId() %>"><%=m.getHallName() %></option>
					<%
						}
					%>	
				</select>
			</td>
		</tr>
		<tr>
			<td style="line-height: 32px;">座位排数</td>
			<td><input type="text" name="seatRow" class="form-control"  style="width:215px;"
				required /></td>
		</tr>
		<tr>
			<td style="line-height: 32px;">座位列数</td>
			<td><input type="text" name="seatCount" class="form-control"  style="width:215px;"
				required /></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<button type="submit" class="btn btn-primary">保 存</button>&nbsp;&nbsp;
				<button type="button" class="btn btn-success" name="backid"
					id="backid">返 回</button>
			</td>
		</tr>
	</table>
</form>
</body>

<script>
	
    $(function () {  
    	
		$('#backid').click(function(){
				window.location.href="Seats/index.jsp";
		 });

    });
</script>
</html>